// source --> https://remakinglawfirms.com/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz-user-content.js?ver=5.3.5
;
jQuery(document).ready(function ($) {
var refreshAfterDeleting = 0;
var isNativeAjaxEnabled = wpdiscuzAjaxObj.wpdiscuz_options.isNativeAjaxEnabled;
$(document).delegate('.wpd-info,.wpd-page-link,.wpd-delete-content,.wpd-user-email-delete-links', 'click', function (e) {
e.preventDefault();
});
// $('#wc_delete_content_message').delay(3000).fadeOut(1500, function () {
// $(this).remove();
// location.href = location.href.substring(0, location.href.indexOf('delete') - 1);
// });
$(document).delegate('.wpd-info.wpd-not-clicked', 'click', function (e) {
var btn = $(this);
btn.removeClass('wpd-not-clicked');
var data = new FormData();
data.append('action', 'wpdGetInfo');
wpdFullInfo(btn, data);
return false;
});
function wpdFullInfo(btn, data) {
var icon = $('.fas', btn);
var oldClass = icon.attr('class');
icon.removeClass();
icon.addClass('fas fa-pulse fa-spinner');
var ajax = isNativeAjaxEnabled ? getUCAjaxObj(false, data) : getUCACustomAjaxObj(false, data);
ajax.done(function (response) {
btn.addClass('wpd-not-clicked');
icon.removeClass();
icon.addClass(oldClass);
if (response) {
$('#wpdUserContentInfo').html(response);
$('#wpdUserContentInfo ul.wpd-list .wpd-list-item:first-child').addClass('wpd-active');
$('#wpdUserContentInfo div.wpd-content .wpd-content-item:first-child').addClass('wpd-active');
if (!($('#wpdUserContentInfo').is(':visible'))) {
$('#wpdUserContentInfoAnchor').trigger('click');
}
}
});
}
$(document).delegate('.wpd-list-item', 'click', function () {
var relValue = $('input.wpd-rel', this).val();
$('#wpdUserContentInfo .wpd-list-item').removeClass('wpd-active');
$('#wpdUserContentInfo .wpd-content-item').removeClass('wpd-active');
$(this).addClass('wpd-active');
$('#wpdUserContentInfo #' + relValue).addClass('wpd-active');
});
$(document).delegate('.wpd-page-link.wpd-not-clicked', 'click', function (e) {
var btn = $(this);
btn.removeClass('wpd-not-clicked');
var goToPage = btn.data('wpd-page');
var action = $('.wpd-active .wpd-pagination .wpd-action').val();
var data = new FormData();
data.append('action', action);
data.append('page', goToPage);
var ajax = isNativeAjaxEnabled ? getUCAjaxObj(true, data) : getUCACustomAjaxObj(true, data);
ajax.done(function (response) {
btn.addClass('wpd-not-clicked');
if (response) {
$('.wpd-content-item.wpd-active').html(response);
}
$('.wpdiscuz-loading-bar').hide();
});
});
$(document).delegate('.wpd-delete-content.wpd-not-clicked', 'click', function () {
var btn = $(this);
var id = parseInt(btn.data('wpd-content-id'));
if (!isNaN(id)) {
var action = btn.data('wpd-delete-action');
if (action == 'wpdDeleteComment' && !confirm(wpdiscuzUCObj.msgConfirmDeleteComment)) {
return false;
} else if (action == 'wpdCancelSubscription' && !confirm(wpdiscuzUCObj.msgConfirmCancelSubscription)) {
return false;
} else if (action == 'wpdCancelFollow' && !confirm(wpdiscuzUCObj.msgConfirmCancelFollow)) {
return false;
}
var icon = $('i', btn);
var oldClass = icon.attr('class');
var goToPage = $('.wpd-wrapper .wpd-page-number').val();
var childCount = $('.wpd-content-item.wpd-active').children('.wpd-item').length;
btn.removeClass('wpd-not-clicked');
icon.removeClass().addClass('fas fa-pulse fa-spinner');
if (childCount == 1 && goToPage > 0) {
goToPage = goToPage - 1;
}
var data = new FormData();
data.append('id', id);
data.append('page', goToPage);
data.append('action', action);
var ajax = isNativeAjaxEnabled ? getUCAjaxObj(false, data) : getUCACustomAjaxObj(false, data);
ajax.done(function (response) {
btn.addClass('wpd-not-clicked');
icon.removeClass().addClass(oldClass);
$('.wpd-content-item.wpd-active').html(response);
if (action == 'wpdDeleteComment' || action == 'wpdCancelFollow') {
refreshAfterDeleting = 1;
}
});
}
});
$(document).delegate('[data-lity-close]', 'click', function (e) {
if ($(e.target).is('[data-lity-close]')) {
if (refreshAfterDeleting) {
window.location.reload(true);
}
}
});
$(document).delegate('.wpd-user-email-delete-links.wpd-not-clicked', 'click', function () {
var btn = $(this);
btn.removeClass('wpd-not-clicked');
$('.wpd-loading', btn).addClass('wpd-show');
var data = new FormData();
data.append('action', 'wpdEmailDeleteLinks');
var ajax = isNativeAjaxEnabled ? getUCAjaxObj(false, data) : getUCACustomAjaxObj(false, data);
ajax.done(function (response) {
btn.addClass('wpd-not-clicked');
$('[data-lity-close]', window.parent.document).trigger('click');
});
});
$(document).delegate('.wpd-user-settings-button.wpd-not-clicked', 'click', function () {
var btn = $(this);
btn.removeClass('wpd-not-clicked');
var guestAction = btn.data('wpd-delete-action');
console.log(guestAction);
if (guestAction !== 'deleteCookies') {
btn.find('.wpd-loading').addClass('wpd-show');
var data = new FormData();
data.append('action', 'wpdGuestAction');
data.append('guestAction', guestAction);
var ajax = isNativeAjaxEnabled ? getUCAjaxObj(false, data) : getUCACustomAjaxObj(false, data);
ajax.done(function (response) {
btn.addClass('wpd-not-clicked');
btn.find('.wpd-loading').removeClass('wpd-show');
try {
var r = $.parseJSON(response);
btn.after(r.message);
var messageWrap = btn.next('.wpd-guest-action-message');
messageWrap.fadeIn(100).fadeOut(7000, function () {
messageWrap.remove();
if (parseInt(r.code) === 1) {
btn.parent().remove();
guestActionDeleteCookieClass();
}
});
} catch (e) {
console.log(e);
}
});
} else {
wpdDeleteAllCookies();
}
});
function guestActionDeleteCookieClass() {
if (!$('.wpd-delete-all-comments').length && !$('.wpd-delete-all-subscriptions').length) {
$('.wpd-delete-all-cookies').parent().addClass('wpd-show');
}
}
function wpdDeleteAllCookies() {
var wpdCookies = document.cookie.split(";");
for (var i = 0; i < wpdCookies.length; i++) {
var wpdCookie = wpdCookies[i];
var eqPos = wpdCookie.indexOf("=");
var name = eqPos > -1 ? wpdCookie.substr(0, eqPos) : wpdCookie;
Cookies.remove(name.trim());
}
Cookies.remove(wpdiscuzAjaxObj.wpdiscuz_options.lastVisitKey, {path: window.location});
location.reload(true);
}
/**
* @param {type} action the action key
* @param {type} data the request properties
* @returns {jqXHR}
*/
function getUCAjaxObj(isShowTopLoading, data) {
if (isShowTopLoading) {
$('.wpdiscuz-loading-bar').show();
}
data.append('postId', wpdiscuzAjaxObj.wpdiscuz_options.wc_post_id);
return $.ajax({
type: 'POST',
url: wpdiscuzAjaxObj.url,
data: data,
contentType: false,
processData: false,
});
}
/**
* @param {type} action the action key
* @param {type} data the request properties
* @returns {jqXHR}
*/
function getUCACustomAjaxObj(isShowTopLoading, data) {
if (isShowTopLoading) {
$('.wpdiscuz-loading-bar').show();
}
data.append('postId', wpdiscuzAjaxObj.wpdiscuz_options.wc_post_id);
return $.ajax({
type: 'POST',
url: wpdiscuzAjaxObj.customAjaxUrl,
data: data,
contentType: false,
processData: false,
});
}
});
// source --> https://remakinglawfirms.com/wp-content/plugins/wpdiscuz/assets/third-party/lity/lity.js?ver=5.3.5
/*! Lity - v2.2.2 - 2017-07-17
* http://sorgalla.com/lity/
* Copyright (c) 2015-2017 Jan Sorgalla; Licensed MIT */
(function (window, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], function ($) {
return factory(window, $);
});
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(window, require('jquery'));
} else {
window.lity = factory(window, window.jQuery || window.Zepto);
}
}(typeof window !== "undefined" ? window : this, function (window, $) {
'use strict';
var document = window.document;
var _win = $(window);
var _deferred = $.Deferred;
var _html = $('html');
var _instances = [];
var _attrAriaHidden = 'aria-hidden';
var _dataAriaHidden = 'lity-' + _attrAriaHidden;
var _focusableElementsSelector = 'a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])';
var _defaultOptions = {
esc: true,
handler: null,
handlers: {
image: imageHandler,
inline: inlineHandler,
youtube: youtubeHandler,
vimeo: vimeoHandler,
googlemaps: googlemapsHandler,
facebookvideo: facebookvideoHandler,
iframe: iframeHandler
},
template: '
'
};
var _imageRegexp = /(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
var _youtubeRegex = /(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i;
var _vimeoRegex = /(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/;
var _googlemapsRegex = /((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i;
var _facebookvideoRegex = /(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i;
var _transitionEndEvent = (function () {
var el = document.createElement('div');
var transEndEventNames = {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
};
for (var name in transEndEventNames) {
if (el.style[name] !== undefined) {
return transEndEventNames[name];
}
}
return false;
})();
function transitionEnd(element) {
var deferred = _deferred();
if (!_transitionEndEvent || !element.length) {
deferred.resolve();
} else {
element.one(_transitionEndEvent, deferred.resolve);
setTimeout(deferred.resolve, 500);
}
return deferred.promise();
}
function settings(currSettings, key, value) {
if (arguments.length === 1) {
return $.extend({}, currSettings);
}
if (typeof key === 'string') {
if (typeof value === 'undefined') {
return typeof currSettings[key] === 'undefined'
? null
: currSettings[key];
}
currSettings[key] = value;
} else {
$.extend(currSettings, key);
}
return this;
}
function parseQueryParams(params) {
var pairs = decodeURI(params.split('#')[0]).split('&');
var obj = {}, p;
for (var i = 0, n = pairs.length; i < n; i++) {
if (!pairs[i]) {
continue;
}
p = pairs[i].split('=');
obj[p[0]] = p[1];
}
return obj;
}
function appendQueryParams(url, params) {
return url + (url.indexOf('?') > -1 ? '&' : '?') + $.param(params);
}
function transferHash(originalUrl, newUrl) {
var pos = originalUrl.indexOf('#');
if (-1 === pos) {
return newUrl;
}
if (pos > 0) {
originalUrl = originalUrl.substr(pos);
}
return newUrl + originalUrl;
}
function error(msg) {
return $('').append(msg);
}
function imageHandler(target, instance) {
var desc = (instance.opener() && instance.opener().data('lity-desc')) || 'Image with no description';
var img = $('');
var deferred = _deferred();
var failed = function () {
deferred.reject(error('Failed loading image'));
};
img
.on('load', function () {
if (this.naturalWidth === 0) {
return failed();
}
deferred.resolve(img);
})
.on('error', failed)
;
return deferred.promise();
}
imageHandler.test = function (target) {
return _imageRegexp.test(target);
};
function inlineHandler(target, instance) {
var el, placeholder, hasHideClass;
try {
el = $(target);
} catch (e) {
return false;
}
if (!el.length) {
return false;
}
placeholder = $('');
hasHideClass = el.hasClass('lity-hide');
instance
.element()
.one('lity:remove', function () {
placeholder
.before(el)
.remove()
;
if (hasHideClass && !el.closest('.lity-content').length) {
el.addClass('lity-hide');
}
})
;
return el
.removeClass('lity-hide')
.after(placeholder)
;
}
function youtubeHandler(target) {
var matches = _youtubeRegex.exec(target);
if (!matches) {
return false;
}
return iframeHandler(
transferHash(
target,
appendQueryParams(
'https://www.youtube' + (matches[2] || '') + '.com/embed/' + matches[4],
$.extend(
{
autoplay: 1
},
parseQueryParams(matches[5] || '')
)
)
)
);
}
function vimeoHandler(target) {
var matches = _vimeoRegex.exec(target);
if (!matches) {
return false;
}
return iframeHandler(
transferHash(
target,
appendQueryParams(
'https://player.vimeo.com/video/' + matches[3],
$.extend(
{
autoplay: 1
},
parseQueryParams(matches[4] || '')
)
)
)
);
}
function facebookvideoHandler(target) {
var matches = _facebookvideoRegex.exec(target);
if (!matches) {
return false;
}
if (0 !== target.indexOf('http')) {
target = 'https:' + target;
}
return iframeHandler(
transferHash(
target,
appendQueryParams(
'https://www.facebook.com/plugins/video.php?href=' + target,
$.extend(
{
autoplay: 1
},
parseQueryParams(matches[4] || '')
)
)
)
);
}
function googlemapsHandler(target) {
var matches = _googlemapsRegex.exec(target);
if (!matches) {
return false;
}
return iframeHandler(
transferHash(
target,
appendQueryParams(
'https://www.google.' + matches[3] + '/maps?' + matches[6],
{
output: matches[6].indexOf('layer=c') > 0 ? 'svembed' : 'embed'
}
)
)
);
}
function iframeHandler(target) {
return '';
}
function winHeight() {
return document.documentElement.clientHeight
? document.documentElement.clientHeight * 0.9
: Math.round(_win.height() * 0.9);
}
function keydown(e) {
var current = currentInstance();
if (!current) {
return;
}
// ESC key
if (e.keyCode === 27 && !!current.options('esc')) {
current.close();
}
// TAB key
if (e.keyCode === 9) {
handleTabKey(e, current);
}
}
function handleTabKey(e, instance) {
var focusableElements = instance.element().find(_focusableElementsSelector);
var focusedIndex = focusableElements.index(document.activeElement);
if (e.shiftKey && focusedIndex <= 0) {
focusableElements.get(focusableElements.length - 1).focus();
e.preventDefault();
} else if (!e.shiftKey && focusedIndex === focusableElements.length - 1) {
focusableElements.get(0).focus();
e.preventDefault();
}
}
function resize() {
$.each(_instances, function (i, instance) {
instance.resize();
});
}
function registerInstance(instanceToRegister) {
if (1 === _instances.unshift(instanceToRegister)) {
_html.addClass('lity-active');
_win
.on({
resize: resize,
keydown: keydown
})
;
}
$('body > *').not(instanceToRegister.element())
.addClass('lity-hidden')
.each(function () {
var el = $(this);
if (undefined !== el.data(_dataAriaHidden)) {
return;
}
el.data(_dataAriaHidden, el.attr(_attrAriaHidden) || null);
})
.attr(_attrAriaHidden, 'true')
;
}
function removeInstance(instanceToRemove) {
var show;
instanceToRemove
.element()
.attr(_attrAriaHidden, 'true')
;
if (1 === _instances.length) {
_html.removeClass('lity-active');
_win
.off({
resize: resize,
keydown: keydown
})
;
}
_instances = $.grep(_instances, function (instance) {
return instanceToRemove !== instance;
});
if (!!_instances.length) {
show = _instances[0].element();
} else {
show = $('.lity-hidden');
}
show
.removeClass('lity-hidden')
.each(function () {
var el = $(this), oldAttr = el.data(_dataAriaHidden);
if (!oldAttr) {
el.removeAttr(_attrAriaHidden);
} else {
el.attr(_attrAriaHidden, oldAttr);
}
el.removeData(_dataAriaHidden);
})
;
}
function currentInstance() {
if (0 === _instances.length) {
return null;
}
return _instances[0];
}
function factory(target, instance, handlers, preferredHandler) {
var handler = 'inline', content;
var currentHandlers = $.extend({}, handlers);
if (preferredHandler && currentHandlers[preferredHandler]) {
content = currentHandlers[preferredHandler](target, instance);
handler = preferredHandler;
} else {
// Run inline and iframe handlers after all other handlers
$.each(['inline', 'iframe'], function (i, name) {
delete currentHandlers[name];
currentHandlers[name] = handlers[name];
});
$.each(currentHandlers, function (name, currentHandler) {
// Handler might be "removed" by setting callback to null
if (!currentHandler) {
return true;
}
if (
currentHandler.test &&
!currentHandler.test(target, instance)
) {
return true;
}
content = currentHandler(target, instance);
if (false !== content) {
handler = name;
return false;
}
});
}
return {handler: handler, content: content || ''};
}
function Lity(target, options, opener, activeElement) {
var self = this;
var result;
var isReady = false;
var isClosed = false;
var element;
var content;
options = $.extend(
{},
_defaultOptions,
options
);
element = $(options.template);
// -- API --
self.element = function () {
return element;
};
self.opener = function () {
return opener;
};
self.options = $.proxy(settings, self, options);
self.handlers = $.proxy(settings, self, options.handlers);
self.resize = function () {
if (!isReady || isClosed) {
return;
}
content
.css('max-height', winHeight() + 'px')
.trigger('lity:resize', [self])
;
};
self.close = function () {
if (!isReady || isClosed) {
return;
}
isClosed = true;
removeInstance(self);
var deferred = _deferred();
// We return focus only if the current focus is inside this instance
if (
activeElement &&
(
document.activeElement === element[0] ||
$.contains(element[0], document.activeElement)
)
) {
try {
activeElement.focus();
} catch (e) {
// Ignore exceptions, eg. for SVG elements which can't be
// focused in IE11
}
}
content.trigger('lity:close', [self]);
element
.removeClass('lity-opened')
.addClass('lity-closed')
;
transitionEnd(content.add(element))
.always(function () {
content.trigger('lity:remove', [self]);
element.remove();
element = undefined;
deferred.resolve();
})
;
return deferred.promise();
};
// -- Initialization --
result = factory(target, self, options.handlers, options.handler);
element
.attr(_attrAriaHidden, 'false')
.addClass('lity-loading lity-opened lity-' + result.handler)
.appendTo('body')
.focus()
.on('click', '[data-lity-close]', function (e) {
if ($(e.target).is('[data-lity-close]')) {
self.close();
}
})
.trigger('lity:open', [self])
;
registerInstance(self);
$.when(result.content)
.always(ready)
;
function ready(result) {
content = $(result)
.css('max-height', winHeight() + 'px')
;
element
.find('.lity-loader')
.each(function () {
var loader = $(this);
transitionEnd(loader)
.always(function () {
loader.remove();
})
;
})
;
element
.removeClass('lity-loading')
.find('.lity-content')
.empty()
.append(content)
;
isReady = true;
content
.trigger('lity:ready', [self])
;
}
}
function wpdLity(target, options, opener) {
if (!target.preventDefault) {
opener = $(opener);
} else {
target.preventDefault();
opener = $(this);
target = opener.data('lity-target') || opener.attr('rel') || opener.attr('src');
}
var instance = new Lity(
target,
$.extend(
{},
opener.data('lity-options') || opener.data('lity'),
options
),
opener,
document.activeElement
);
if (!target.preventDefault) {
return instance;
}
}
wpdLity.version = '2.2.2';
wpdLity.options = $.proxy(settings, wpdLity, _defaultOptions);
wpdLity.handlers = $.proxy(settings, wpdLity, _defaultOptions.handlers);
wpdLity.current = currentInstance;
$(document).on('click.lity', '[data-wpd-lity]', wpdLity);
return wpdLity;
}));
// source --> https://remakinglawfirms.com/wp-content/plugins/divi-builder/core/admin/js/es6-promise.auto.min.js?ver=5.3.2
/** @license ES6-Promise v4.2.8
* es6-promise.auto.min.js
* https://github.com/stefanpenner/es6-promise
*
* Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t